﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="Jy123.Web.Manage.User.Gift.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery.js" type="text/javascript"></script>

    <script src="../../js/jquery.ui.js" type="text/javascript"></script>

    <script src="../../js/main.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
    function del(id)
    {
        if(confirm('你确认删除吗?'))
            self.location="?Type=del&id="+id;
    }
    function Islock(id,flag)
    {
        var str="确定要锁定吗？";
        if(flag==2)
        {
            str="确定取消推荐吗？";
        }
        if(confirm(str))
            self.location="?Type=Islock&id="+id+"&flag="+flag;
    }
    </script>

    <title></title>
</head>
<body>
    <h4>
        <a href="#"><span>礼物管理</span></a></h4>
    <form id="form1" runat="server">
    <div class="register">
        <ul>
            <li>按分类筛选：</li>
            <li>
                <asp:DropDownList ID="ddlGiftClass" runat="server" Width="96px">
                </asp:DropDownList>
            </li>
            <li>
                <asp:TextBox ID="txtSearch" runat="server" CssClass="text"></asp:TextBox></li>
            <li>
                <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="button" OnClick="btnSearch_Click" /></li>
            <li>
                <asp:Button ID="btnAll" runat="server" Text="显示所有" CssClass="button" OnClick="btnAll_Click" /></li>
        </ul>
    </div>
    <div>
        <asp:Repeater runat="server" ID="RptData">
            <HeaderTemplate>
                <table class="tblist">
                    <tr>
                        <th>
                            编号
                        </th>
                        <th>
                            名称
                        </th>
                        <th>
                            金币
                        </th>
                        <th>
                            图片
                        </th>
                        <th>
                            礼物描述
                        </th>
                        <th>
                            分类
                        </th>
                        <th>
                            状态
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr id="<%# Eval("ID") %>">
                    <td>
                        <%# Container.ItemIndex + 1 + pagesize * (cpage - 1)%>
                    </td>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "GName").ToString()%>
                    </td>
                    <td class="tr">
                        <%#Eval("Price","{0:#.00}")%>
                    </td>
                    <td>
                        <img src="<%# DataBinder.Eval(Container.DataItem, "Picture")%>" class="listImg" />
                    </td>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "Decription")%>
                    </td>
                    <td>
                        <%# DataBinder.Eval(Container.DataItem, "GiftClassName")%>
                    </td>
                    <td>
                        <%# ShowLock(DataBinder.Eval(Container.DataItem, "IsLock"))%>
                    </td>
                    <td>
                        <%--<%# ShowLock(Eval("IsLock"),Eval("ID"))%> --%>
                        <%--<%# ShowRec(Eval("isRec"),Eval("ID"))%>--%>
                        <a class="btnsty" href="add.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "ID")%>">
                            编辑</a>
                        <%# Lock(Eval("IsLock"), Eval("ID"),1)%>
                        <%--<%# Rec(Eval("isRec"),Eval("ID"), 1)%>--%>
                        <a class="btnsty" href="javascript:del(<%# Eval("ID")%>);">删除</a>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr>
                    <td colspan="8" class="tr">
                        <% =string.Format("当前{0}/{1},共{2}条记录", cpage, count[1], count[0]) + PageString((int)count[1], cpage, "index.aspx?page=$num$")%>
                    </td>
                </tr>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    </form>
</body>
</html>
